package ubi.quando.UI;

import org.osmdroid.util.GeoPoint;
import org.osmdroid.views.MapView;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;

public class MapViewUbi extends MapView {
	private GeoPoint mLoc = null;

	public MapViewUbi(Context context, AttributeSet attrs) {

		super(context, attrs);
	}

	@Override
	public boolean onInterceptTouchEvent(MotionEvent ev) {

		if (ev.getAction() == MotionEvent.ACTION_DOWN) {

			mLoc = this.getProjection().fromPixels(ev.getX(), ev.getY());
		}
		return super.onInterceptTouchEvent(ev);
	}

	public GeoPoint GetLoc() {
		return mLoc;
	}
}